home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 3 / QRZ Ham Radio Callsign Database - Volume 3.iso / world / mac / digital / pktmacse.hqx / Pkt Macs / PktMacs update doc (text) < prev    next >
Text File  |  1991-04-10  |  4KB  |  104 lines

  1.  
  2. Programmer╒s Documentation for PktMacs Update Button
  3.  
  4. The update button I have written for the PktMacs stack is designed to make 
  5. updating the stack easy and efficient for the end user.  The button will 
  6. read a text file containing the update information and incorporate it into 
  7. the user╒s stack.  The ability to distribute a file that allows the user to 
  8. update his stack should eliminate the need to distribute a whole new stack 
  9. every time the contents of the stack changes.  Another advantage of 
  10. distributing changes in a text file is that the user can easily see what 
  11. information is being changed.
  12.  
  13. Syntax of the Update File
  14.  
  15. At the beginning of the file there can be an arbitrary number lines beginning 
  16. with ╥#╙.  These lines can be used as comment lines.  This would be a good 
  17. place to put the date of the update and other useful comments.
  18.  
  19. After the comment lines the first line must of the form:
  20.  
  21. The current number of people should be <number of entries>.
  22.  
  23. where <number of entries> is the number of people in the last version of the 
  24. stack.  If this line is not found at the beginning of the update file, the 
  25. user will see the message ╥The file is incomplete.  Obtain another copy.╙  If 
  26. the number of entries in the user╒s stack does not match the number of entries 
  27. that the file says should exist, the user will see the message ╥You have 
  28. missed an update,╙ and the user will be asked if he wants to proceed.
  29.  
  30. The remaining lines of the update file describe the changes that need to be 
  31. made to the stack.  Three types of changes are possible: add a new card, 
  32. delete a card, and change a card.
  33.  
  34. The type of operation is indicated by a line of the form:
  35.  
  36. operation: {add | delete | change} <call sign>
  37.  
  38. The <call sign> parameter is not used when an card is added.
  39.  
  40. When an card is added or changed, the lines following the ╥operation╙ line 
  41. specify what information should be put into a person╒s card.  The format of 
  42. the information lines is:
  43.  
  44. <field name>:<info line 1>
  45. <optional additional info lines>
  46.  
  47. The valid field names used in the stack are: ╥callsign╙, ╥home╙, ╥first╙ (for 
  48. the first name), ╥last╙ (for the last name), ╥address╙, ╥city╙, ╥state╙, 
  49. ╥zip╙, ╥comments╙, and ╥phone╙.  Additional lines of information can follow 
  50. the first line for a field.  For the comments field all of the lines of 
  51. information are formed into a line of text without carriage returns.
  52.  
  53.  
  54. Example
  55. Assume that the PktMacs stack contained information for 66 people, that we 
  56. wanted to add one person, delete one person, and change the call sign of 
  57. a third person.  An update file that would accomplish this is:
  58.  
  59. #
  60. # This file contains updates for the PktMacs stack from 8/1/88 to 9/1/88
  61. # To incorporate this information into your stack, click the UPDATE button
  62. # in the stack and open this file.  Do not change the contents of this file. Any
  63. # modifications may prevent the button from using the information.
  64. The current number of people should be 66.
  65. operation: add
  66. callsign:wd8puh
  67. first:Steve
  68. last:Fine
  69. address:504 Linden Rd.
  70. Eastview Terrace
  71. City:State College
  72. State:PA
  73. zip:16801
  74. comments:Steve wrote the script used to update the PktMacs stack from a text
  75. file.  He also sells a packet program for the Mac.
  76. operation:delete w3xxx
  77. operation:change wd8c
  78. callsign:w8c
  79.  
  80. Note that in this example WD8PUH╒s address and comments both span two lines.  
  81. The address will be put in the stack as two lines while the RETURN in the 
  82. middle of the comments will be replaced by a space.
  83.  
  84.  
  85. Limitations
  86. This updating process assumes that everyone has a call sign.
  87.  
  88. Fields that have multiple word names in Hypercard are handled by special code 
  89. in the script.  If another multi-word field name is added, the script must be 
  90. changed.
  91.  
  92. The script calls the FileName XFCN written by Steve Maller of Apple Computer.  
  93. This XFCN must be in the stack or somewhere in the user╒s Hypercard hierarchy.
  94.  
  95. No extra spaces should follow colons in update file lines that contain 
  96. information for the stack.
  97.  
  98.  
  99.  
  100. Steve Fine, WD8PUH
  101. 504 Linden Rd.
  102. State College, PA  16801
  103. September 17, 1988
  104.